/*
 * @Author: MrGao
 * @Date: 2023-02-09 16:22:29
 * @LastEditors: MrGao
 * @LastEditTime: 2023-02-14 17:36:15
 * @FilePath: \vue-express\client\vite.config.js
 * @Description: 
 * 
 * 
 */
import { defineConfig } from "vite";
import vue from '@vitejs/plugin-vue';

export default defineConfig({
  plugins: [vue()],
  resolve: {
    extensions: ['.vue', '.js']
  },
  server: {
    port:3001,
    proxy: {
      '/api' : {
        target: 'http://localhost:8082',
        changeOrigin: true,
        rewrite: path => path.replace(/^\/api/, '')
      }
    }
  }
})